import request from '@/utils/request'

export function getCaseDetail(caseId) {
    return request({
      url: `/case/detail/${caseId}`,
      method: 'get'
    })
}

export function getBeforeAssertionListAxios(caseId) {
    return request({
      url: `/beforeAssertion/list/${caseId}`,
      method: 'get'
    })
}

export function getBeforeAssertionTypeAxios() {
    return request({
      url: "/beforeAssertion/list/type",
      method: 'get'
    })
}


export function beforeAssertionAddPost(data) {
    return request({
      url: "/beforeAssertion",
      method: 'post',
      data
    })
}

export function beforeAssertionAddDelete(automaticId) {
    return request({
      url: `/beforeAssertion/${automaticId}`,
      method: 'delete'
    })
}

export function beforeAssertionAddUpdate(automaticId) {
    return request({
      url: `/beforeAssertion/deatil/${automaticId}`,
      method: 'get'
    })
}

export function beforeAssertionAddUpdateTrue(data) {
    return request({
      url: "/beforeAssertion",
      method: 'put',
      data
    })
}

export function getDatabaseConnectList(caseId) {
    return request({
      url: `/databaseConnect/list/${caseId}`,
      method: 'get'
    })
}

export function getDatabaseConnectType() {
    return request({
      url: "/databaseConnect/type",
      method: 'get'
    })
}

export function connectionConfigurationAllListGet() {
    return request({
      url: "/connectionConfiguration/list/all",
      method: 'get'
    })
}

export function addConnectionConfigurationPost(data) {
    return request({
      url: "/databaseConnect",
      method: 'post',
      data
    })
}

export function connectionConfigurationPut(data) {
    return request({
      url: "/databaseConnect",
      method: 'put',
      data
    })
}


export function getDatabaseDetailAxios(databaseId) {
    return request({
      url: `/databaseConnect/detail/${databaseId}`,
      method: 'get'
    })
}


export function deleteDatabaseAxios(databaseId) {
    return request({
      url: `/databaseConnect/${databaseId}`,
      method: 'delete'
    })
}

export function stateUpdateAxios(databaseId) {
    return request({
      url: `/databaseConnect/state/${databaseId}`,
      method: 'get'
    })
}

export function testDatabaseAxios(databaseId) {
    return request({
      url: `/databaseConnect/test/${databaseId}`,
      method: 'get'
    })
}